<!-- Modal -->
<div id="billing_modal"
	class="modal hide fade" tabindex="-1" role="dialog"
	aria-labelledby="myModalLabel" aria-hidden="true">

	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal"
			aria-hidden="true">×</button>
		<h3 id="myModalLabel">Commande</h3>
	</div>
	<!-- Body -->
	<div class="modal-body">
		<p>Assurez-vous que les informations renseignées ci-dessous sont
			correctes:</p>

		<strong>Prix total :</strong> $149<br> <strong>Points de fidélité :</strong>
		10000
		<br> <br> Adresse de livraison :<br> <select id="adresse_livr"
			onchange="changeAdresseLivr(this.value);">
			<option value="1">Adresse default</option>
			<option value="2">Adresse bis</option>
		</select> <br>

		<div id="alert_adrLivr1" class="alert alert-info fade in"
			style="margin-top: 10px;">
			<dl class="dl-horizontal">
				<dt>Adresse</dt>
				<dd>2012 Rue Saint Antoine</dd>
				<dt>Ville</dt>
				<dd>Montréal, QC</dd>
				<dt>Code postal</dt>
				<dd>H2L3F8</dd>
			</dl>
		</div>
		<div id="alert_adrLivr2" class="alert alert-info fade in"
			style="display: none; margin-top: 10px;">
			<a class="close" href="#">&times;</a>
			<dl class="dl-horizontal">
				<dt>Adresse</dt>
				<dd>007 Rue Saint Joseph</dd>
				<dt>Ville</dt>
				<dd>Montréal, QC</dd>
				<dt>Code postal</dt>
				<dd>XT3S2L</dd>
			</dl>
		</div>

	</div>
	<!-- Footer -->
	<div class="modal-footer">
		<a href="confirmation_page.php" class="btn btn-primary">Payer</a>
		<button class="btn" data-dismiss="modal" aria-hidden="true">Annuler</button>
	</div>
</div>

<script>
$(document).ready( function() {

	$('.alert .close').live("click", function(e) {
	    $(this).parent().hide();
	});		

});

function changeAdresseLivr(myval) {
	if($("select#adresse_livr").val() == 1) {
	    $('#alert_adrLivr1').show();
	    $('#alert_adrLivr2').hide();
	} else {
		$('#alert_adrLivr2').show();
		$('#alert_adrLivr1').hide();
	}
}
</script>
